import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ArgumentTypeForm,  ArgumentQuery, ArgumentPageResult } from './types';

/**
 * 参数配置查询
 *
 * @param queryParams
 */
export function configPages(queryParams: ArgumentQuery): AxiosPromise<ArgumentPageResult> {
  return request({
    url: '/config/pages',
    method: 'get',
    params: queryParams,
  });
}
/**
 * 参数配置新增
 *
 * @param queryParams
 */
export function configAdd(queryParams: ArgumentTypeForm){
  return request({
    url: '/config/add',
    method: 'post',
    data: queryParams,
  });
}
/**
 * 参数配置修改
 *
 * @param queryParams
 */
export function configEdit(queryParams: ArgumentTypeForm){
  return request({
    url: '/config/edit',
    method: 'post',
    data: queryParams,
  });
}
/**
 * 参数配置删除
 *
 * @param queryParams
 */
export function configDel(id:number|string){
  return request({
    url: '/config/del?id='+id,
    method: 'get',
  });
}

